The present invention relates to shading surface data defined in three dimensional space.
Several procedures are known for rendering images containing elements defined as three-dimensional data. A known approach to generating images of photo-realistic quality is to consider light reflections between all objects as a system of equations, which may then be solved using an iterative process. This approach, known generally as radiosity, results in brightness values being identified for surfaces of three-dimensional objects. In order to achieve photo-realistic quality, the surfaces of objects must be subdivided into a plurality of mesh elements, from which the system of equations may then be constructed. In order to simplify calculations, and to ensure that the system of equations is not excessively large, practical implementations of the radiosity technique consider brightness as being constant across the area of each individual mesh element.
When rendering the resulting elements it is necessary to perform interpolations between brightness values, such that brightness discontinuities do not appear at element boundaries. In known systems, Gouraud shading is used with respect to brightness values identified at element vertices. In order to do this, a determination of brightness values at the vertices of elements must be determined from the constant brightnesses of neighbouring elements. The Gouraud shading performs linear interpolation of the vertex brightness and offers brightness value continuity at element boundaries. Slope continuities, or changes in brightness gradient, are not handled in Gouraud shading, resulting in severe artefacts at element boundaries where brightness gradient varies greatly over short distances.
According to a first aspect of the present invention, there is provided a method of shading a surface generated from a radiosity simulation, in which said surface has been divided into a plurality of elements, and a brightness value has been calculated for each of said elements, including the steps of defining an initial surface shading in which the resolution of shading is determined in response to the highest element density of said surface; processing element brightness values to generate brightness values for said initial surface shading; and filtering values of said initial surface shading to generate brightness values for an enhanced surface shading.
In a preferred embodiment, the resolution of the initial surface shading is equal to the density of one pixel per element vertex at the region of greatest element density within said surface generated from the radiosity simulation.
Preferably, the step of processing element brightness values includes combining the brightness of a plurality of elements to generate a single texel brightness value in said initial surface shading.
According to a second aspect of the present invention, there is provided apparatus for shading a surface generated from a radiosity simulation, including processing means and storage means including a storage area for instructions for said processing means, in which said surface has been divided into a plurality of elements, and a brightness value has been calculated for each of said elements, wherein said processing means is configurable to perform the steps of defining an initial surface shading in which the resolution of shading is determined in response to the highest element density of said surface; processing element brightness values to generate brightness values for said initial surface shading; and filtering values of said initial surface shading to generate brightness values for an enhanced surface shading.